TAGs: writing algebraic expressions